public class Test01{
    public static void main(String[] args){
        int num = 0;
        for (int i = 1; i <= 5; i++){
            num += i;
            System.out.println(num);
        }
        System.out.println(num);
    }
}